Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after closing a tooltip's Popup directly #5932

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

SamBent
Copy link
Contributor

@SamBent SamBent commented Jan 10, 2022

Fixes #5730

Description

Closing a tooltip's Popup directly (as opposed to closing the ToolTip and letting WPF close the Popup in response) causes WPF to clear some private state on the ToolTip while leaving its IsOpen=true. When the ToolTip is eventually closed, WPF uses that state and crashes because it's null.

Fixed by preserving the private state until the ToolTip itself is closed, and adding logic to ensure that the state is cleared even if the Popup was already closed before the ToolTip closed.

Customer Impact

Fixes a regression.

Regression

Yes.

Testing

Risk

Low. The fix itself is safe. The customer reports did not include repros, so there's a small risk that there are crashing scenarios that this fix doesn't address.

@SamBent SamBent requested a review from a team as a code owner January 10, 2022 23:57
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jan 10, 2022
@ghost ghost requested review from fabiant3 and ryalanms January 10, 2022 23:57
@dipeshmsft dipeshmsft self-assigned this Jan 13, 2022
@singhashish-wpf singhashish-wpf merged commit 5e894ad into dotnet:main Jan 19, 2022
singhashish-wpf added a commit to SamBent/wpf that referenced this pull request Jan 27, 2022
singhashish-wpf added a commit that referenced this pull request Feb 1, 2022
* make SafeArea check work when capture is active

* Update and sync changes with main and #5932

Co-authored-by: Ashish Kumar Singh <SINGHASHISH@MICROSOFT.COM>
singhashish-wpf added a commit that referenced this pull request Feb 7, 2022
dipeshmsft pushed a commit that referenced this pull request Feb 7, 2022
…6063)

* ToolTips in popups (or any context where capture is active) (#5931)

* make SafeArea check work when capture is active

* Update and sync changes with main and #5932

Co-authored-by: Ashish Kumar Singh <SINGHASHISH@MICROSOFT.COM>

* Fix merge errors for #5931 and #5932 (#6078)

* update to make same changes as 5931

Co-authored-by: Sam Bent <sambent@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception opening right click menu if tooltip is shown
3 participants